package com.moli.iov.handle.alarm.enums;

/**
 * <p>
 *
 * </p>
 *
 * @author zql
 * @since 2019/9/5 9:35
 */
public enum RelieveTypeEnum {

  /**
   * 自动解除告警
   */
  AUTOMATIC(1, "自动解除告警"),

  /**
   * 人工解除告警
   */
  MANUAL(2, "人工解除告警");

  private int flag;
  private String msg;

  RelieveTypeEnum(int flag,String msg){
    this.flag = flag;
    this.msg = msg;
  }

  public static String getMsg(int flag){
    for (RelieveTypeEnum relieveTypeEnum : RelieveTypeEnum.values()){
      if(relieveTypeEnum.flag == flag){
        return relieveTypeEnum.msg;
      }
    }
    return "";
  }

  public int getFlag() {
    return flag;
  }

  public String getMsg() {
    return msg;
  }

}
